package com.yunhui.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 类型表
 * </p>
 *
 * @author WGH
 * @since 2019-12-09
 */
public class Traveltype extends Model<Traveltype> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 旅游类型名称
     */
    @TableField("typeName")
    private String typeName;

    /**
     * 旅行类型的父级id
     * @return
     */
    @TableField("parentLeven")
    private Integer parentLeven;

    /**
     * 创建时间
     * @return
     */
    @TableField("createTime")
    private Date createTime;


    //父级名称
    @TableField(exist = false)
    private String fuName;

    public String getFuName() {
        return fuName;
    }

    public void setFuName(String fuName) {
        this.fuName = fuName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public Integer getParentLeven() {
        return parentLeven;
    }

    public void setParentLeven(Integer parentLeven) {
        this.parentLeven = parentLeven;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    @Override
    public String toString() {
        return "Traveltype{" +
                "id=" + id +
                ", typeName='" + typeName + '\'' +
                ", parentLeven=" + parentLeven +
                ", createTim=" + createTime+
                '}';
    }
}
